// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/en'

import App from './App'
import router from './router'
import store from './vuex/store'
import '../static/css/reset.css'

Vue.config.productionTip = false

Vue.use(ElementUI, { locale, size: 'small' })
Vue.use(VueI18n)

const messages = {
  zh_en: {
    base: {
      title: 'Manage Your Shop',
      check: 'Under eview, shop will be published after review'
    },
    home: {
      loginH3: 'Login your shop',
      loginState: 'No Account? go to signup',
      loginBtn: 'Login',
      loginIdtMsg: 'Please enter correct email or phone',
      loginPassMsg: 'The length range from 8 to 16',
      signupH3: 'Create your shop',
      signupState: 'Have an account? go to Login',
      signupBtn: 'Signup',
      signupIdtMsg: 'Please enter correct email',
      signupPassMsg: 'The length range from 8 to 16',
    },
    sideBar: {
      goodsUrlText: 'All Goods',
      settingsUrlText: 'Settings'
    },
    goods: {
      addKindText: '+ Add New Kind',
      addGoodText: 'Add New Good',
      save: 'Save',
      cancel: 'Cancel',
      chooseCurrency: 'Please choose the kind of currency',
      edit: 'Edit',
      delete: 'Delete',
      op: 'Operation'
    },
    settings: {
      basicInfo: 'Basic Info',
      save: 'Save',
      changeEmail: 'Change Email',
      warning: 'Do Not Forget to Save after Editting'
    },
    uploader: {
      chooseFile: 'choose a file'
    },
    goodColumn: {
      name: 'Goods Name',
      price: 'Price',
      picurl: 'Picture',
      description: 'Simple Description',
      count: 'Stock',
      sales: 'Sales',
      detail: 'details',
    },
    shopColumn: {
      id: 'Shop Id',
      name: 'Shop Name',
      avatar: 'Avatar',
      description: 'Shop Description',
      QR: 'QR Code'
    }
  },
  zh_cn: {
    base: {
      title: '店铺管理',
      check: '店铺正在审核中，审核通过后发布'
    },
    home: {
      loginH3: '登录店铺',
      loginState: '没有账号？去注册',
      loginBtn: '登录',
      loginIdtMsg: '请输入正确的邮箱或手机号',
      loginPassMsg: '长度在 8 到 16 个字符',
      signupH3: '注册店铺',
      signupState: '已有账号？去登录',
      signupBtn: '注册',
      signupIdtMsg: '请输入正确的邮箱',
      signupPassMsg: '长度在 8 到 16 个字符',
    },
    sideBar: {
      goodsUrlText: '全部商品',
      settingsUrlText: '店铺设置'
    },
    goods: {
      addKindText: '+ 添加新的类别',
      addGoodText: '添加商品',
      save: '保存',
      cancel: '取消',
      chooseCurrency: '请选择币种',
      edit: '编辑',
      delete: '删除',
      op: '操作'
    },
    settings: {
      basicInfo: '基础信息',
      save: '保存',
      changeEmail: '修改邮箱',
      warning: '修改之后请保存'
    },
    uploader: {
      chooseFile: '选择文件',
    },
    goodColumn: {
      name: '商品名称',
      price: '单价',
      picurl: '商品图片',
      description: '商品介绍',
      count: '库存',
      salse: '销量',
      detail: '商品详情',
      QR: '店铺二维码'
    },
    shopColumn: {
      id: '店铺ID',
      name: '店铺名称',
      avatar: '店铺头像',
      description: 'Shop 店铺介绍',
      QR: '店铺二维码'
    }
  },
}
const i18n = new VueI18n({
  locale: 'zh_en',
  messages,
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  i18n,
  components: { App },
  template: '<App/>'
})
